Release 10.1A: OpenEdge Data Management:
SQL Development


Connecting from a Java application using a URL

A Java application must perform two steps to connect to an OpenEdge database through a JDBC driver:

  1. It must load the JDBC driver.
  2. It must connect to the JDBC driver.

To load the JDBC driver, call the Class.forName method in the JDBC application. The Class.forName method takes the fully qualified class name of the JDBC driver as its argument. The fully qualified class name for the JDBC driver is com.ddtek.jdbc.openedge.OpenEdgeDriver.

This class name is case-sensitive and must be typed exactly as shown. The Class.forName method also registers the specified JDBC driver with the Driver Manager class so that the driver is available for connections.

Here is an example of the call needed to load and register the driver:

CLASS.FORNAME ( "com.ddtek.jdbc.openedge.OpenEdgeDriver"); 

Now that the JDBC driver has been loaded and registered, the DriverManager.getConnection method must be called to establish a connection to the database. The getConnection method takes three arguments:

Database connection examples

Several variations of the call needed to connect to the database follow:


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095